<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box {
            width: 500px;
            height: 300px;
            margin: 200px auto;
            background: url(./images/img-1.jpg) no-repeat;
            background-size: cover;
            transform-style: preserve-3d;
            perspective: 1000px;
        }

        .box_l,
        .box_r {
            position: relative;
            float: left;
            width: 50%;
            height: 100%;
            background-color: red;
            transition: transform 2s;
            box-sizing: border-box;
        }

        .box_l {
            border-right: 1px solid #ccc;
            transform-origin: left center;
        }
        .box_r {
            border-right: 1px solid #ccc;
            transform-origin: right center;
        }
        .box_l::before {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: pink;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
        }

        .box_r::before {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: pink;
            left: 5px;
            top: 50%;
            transform: translateY(-50%);
        }

        .box:hover .box_l {
            transform: rotateY(-160deg);
        }

         .box:hover .box_r {
            transform: rotateY(160deg);
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="box_l"></div>
        <div class="box_r"></div>
    </div>
</body>

</html>